function y = computeEquivalentStrain(element,epsilon)
    if strcmp(element.EquivalentStrainMode,'euclidean')
        tmp = epsilon(1)^2 + epsilon(2)^2 +...
            0.5*epsilon(3)^2;
        y = sqrt(tmp);
    elseif strcmp(element.EquivalentStrainMode,'strain norm')
        Ce = element.elasticConstitutiveMatrix;
        tmp = epsilon'*(Ce*epsilon);
        y = sqrt(tmp);
    end
end
